package 例子.食客;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import 例子.I常量;
import 例子.甜点.I饭后甜点;

@Component
public class 吃货甲 implements I食客{

    @Autowired
    @Qualifier(I常量.最喜欢的饭后甜点名)
    private I饭后甜点 选的甜点;

    public 吃货甲() {
    }

    @Override
    public void 吃甜点() {
        if(null != 选的甜点){
            选的甜点.吃起来();
        }
    }

    public I饭后甜点 get选的甜点() {
        return 选的甜点;
    }

    public void set选的甜点(I饭后甜点 选的甜点) {
        this.选的甜点 = 选的甜点;
    }
}
